enable accessibility on Linux when org.a11y.Status IsEnabled is true
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sun, 2 Aug 2020 08:49:03 +0000 (09:49 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 2 Aug 2020 08:49:03 +0000 (09:49 +0100)
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=54886d7f81175ac6
Last-Update: 2020-04-16

Otherwise accessibility would only work when Orca is set to be started
in the session preference, and it would not work when running Orca or
compiz' zoom by hand.

The existing comment said that it was always true since gnome 3.6, but at
least in Debian 8's gnome 3.14, Debian 9's gnome 3.22, and Debian 10's
3.30 it is not always true, it is Orca which sets it on startup. Compiz's
focuspoll module also does so for people with low vision using zoom with
focus tracking.

Gbp-Pq: Name enable_a11y_on_linux.diff

src/platformsupport/linuxaccessibility/dbusconnection.cpp

index cacbfdae9f0a9fa98de0752a2f799ed5b7a8a7e1..45ddc8e49635de42fb41df84def1fed79667c9a3 100644 (file)
@@ -120,8 +120,7 @@ void DBusConnection::serviceRegistered()
     //debugging.
     static const bool a11yAlwaysOn = qEnvironmentVariableIsSet("QT_LINUX_ACCESSIBILITY_ALWAYS_ON");
 
-    // a11yStatus->isEnabled() returns always true (since Gnome 3.6)
-    bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled();
+    bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled() || a11yStatus->isEnabled();
 
     if (enabled != m_enabled) {
         m_enabled = enabled;